package cn.xopencode.userservice.rpc;

import cn.xopencode.common.framework.vo.CommonResult;
import cn.xopencode.userservice.manager.UserManager;
import cn.xopencode.userservice.rpc.user.UserRpc;
import cn.xopencode.userservice.rpc.user.dto.UserDTO;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService(version = "${dubbo.provider.UserRpc.version}", validation = "false")
public class UserRpcImpl implements UserRpc {

    @Autowired
    private UserManager userManager;

    @Override
    public CommonResult<UserDTO> getUser(String userId) {
        return CommonResult.success(userManager.getUser(userId));
    }

}
